-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(node): Avoid double wrapping http module for vercel on Node
#16178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
67ee12d to
512e319
Compare
size-limit report 📦
|
72ddee3 to
596dcee
Compare
|
Would you mind explaining in the PR description why we do this and what this PR does? I can see us going back to this in 3 months and asking ourselves wtf |
aff551f to
0cd1834
Compare
512e319 to
96423b2
Compare
http module for vercel-edgehttp module for vercel on Node
|
To recapitulate, what needs to happen for the logic to still work is to register the Findings so far, because the current approach doesn't work:
tldr we have no good place to register the |
As pre-work for #16178, actually add a test for this (kind of). This showed that there was actually a fundamental flaw here, as we looked as the `req` not the `res`, oops.
96423b2 to
8e6d77e
Compare
|
OK we can't get this to work on Vercel on prod, so we'll just remove this for now until we get a better handle on this 😬 cc @lforst |
|
I am in support of removing |
|
Replaced by #16217 |
We could never get this to apply properly on vercel in production, so we're removing this for now and may revisit this later. Replaces #16178
This PR is a follow up to #16177
There, we found out that double-wrapping (with
stealthWrap) the http module seems to break in ESM mode, for whatever reason - us double-wrapping this leads to the OTEL-instrumentation creating spans twice, for whatever reason.We removed this for the core sentry-http instrumentation, but we still do it for vercel-edge here. For consistency, this cleans this up so we should be safe.
As an added benefit, it again leads to all the sentry-specific instrumentation code to be in one place, and to us not having to care about instrumentation order, hopefully, if this actually works.